BevelButton Class
Used for creating a bevel button. A BevelButton can use text, a graphic, a pop-up menu, or several of these interface elements in combination.
More information available in parent classes: RectControl:Control:Object
Because this is a RectControl, see the RectControl for other properties and events that are common to all RectControl objects.
Notes
A BevelButton can display a graphic, a label (caption), or both.
The first row in a menu has an index of zero.
If the Caption property contains an ampersand character, it will display only if it is preceded by another ampersand character. For example, if you set the Caption property to "Bob & Ray", only "Bob Ray" will display. You need to set it to "Bob && Ray". The ampersand character is used on Windows for keyboard accelerators. This is done to make applications on all platforms behave consistently.
The "No Bevel" option for the Bevel property is for the Windows XP operating system. The button appears to have no border until the mouse enters the region of BevelButton control. Then the outline of the button appears. On non-XP operating systems, the "No Bevel" option has the same appearance of "Small Bevel."
Examples
The following example places an icon in the bevel button, aligns it, and specifies the placement of the caption. The graphic, "databasequery," has been added to the Project.
Me.iconalign=6
Me.captionalign=0
Me.captionplacement=2
Me.icondx=2
Me.icondy=1
The following example creates a bevel button menu.
Dim i as Integer
Dim last as Integer
s="January,February,March,April,May,June,July,August,September," _
+"October,November,December"
last= CountFields(s,",")
Me.caption="Month"
Me.captionalign=0 //flush left
Me.hasMenu=2 //menu on right
For i=1 to last
me.addRow NthField(s,",",i)
Next
The following line of code in the BevelButton's Action event handler sets the BevelButton caption to the value that the user selects:
See Also
ComboBox, ContextualMenu, PopupMenu, PushButton controls.